{include file="$usertemplate/header.tpl.html" title=header} 
    	<div class="content">
   			{include file="$usertemplate/left.tpl.html" title=left} 
        	<div class="cont_right">
           		<div class="main_content">
                	<h2>Xác nhận đơn hàng</h2>
                      
                    <div class="details">
                       <div class="formType">
    <form action="" method="post" name="formOrder" id="formOrder">
        <fieldset>
            <div class="infoType3">
                <div>
                    <h2 style="font-weight:bold; font-size:13px">{$messages.cInformation}</h2>
                    <p>
                        <label for="name">{$messages.cus_name}:&nbsp;</label>{$order.name}</p>
                    <p>
                        <label for="email">{$messages.email}:&nbsp;</label>{$order.email}</p>
                    <p>
                        <label for="address">{$messages.address}:&nbsp;</label>{$order.address}</p>
                    <p>
                        <label for="tel">{$messages.tel}:&nbsp;</label>{$order.tel}</p>
                    <p>
                        <label for="cell">{$messages.cel}:&nbsp;</label>{$order.cell}</p>
                    <p class="btnEdit">
                        <!--<input type="button" id="btnLogin" name="btnLogin" title="Edit" value="Edit"
                        onClick="document.formOrder.plus.value='editOrder'; document.formOrder.submit();"
                        />-->
                        <!-- <a href="#" title="Edit" onClick="document.formOrder.plus.value='editOrder';
                        document.formOrder.submit();"><span>{$messages.edit}</span></a>-->
                    </p>
                </div>
                <div>
                    <h2 style="font-weight:bold; font-size:13px">{$messages.rInformation}</h2>
                    <p>
                        <label for="name">{$messages.rname}:&nbsp;</label>{$order.rname}</p>
                    <p>
                        <label for="date">{$messages.rdate}:&nbsp;</label>{if $order.rdate}{$order.rdate}{else}{$order.day}/{$order.month}/{$order.year}{/if}</p>
                    <p>
                        <label for="address">{$messages.raddress}:&nbsp;</label>{$order.raddress}</p>
                    <p>
                        <label for="tel">{$messages.rtel}:&nbsp;</label>{$order.rtel}</p>
                    <p>
                        <label for="cell">{$messages.rcel}:&nbsp;</label>{$order.rcell}</p>
                    <p class="btnEdit">
                        <!--<input type="button" id="btnLogin" name="btnLogin" title="Edit" value="Edit"
                        onClick="document.formOrder.plus.value='editOrder'; document.formOrder.submit();"
                        />-->
                        <!--<a href="#" title="Edit" onClick="document.formOrder.plus.value='editOrder';
                        document.formOrder.submit();"><span>{$messages.edit}</span></a>-->
                    </p>
                </div>
            </div>
            <h2 style="font-weight:bold; font-size:13px; padding:10px 0px; background:none; color:#004F7E">{$messages.pInformation}</h2>{if $cartItems}
            <div class="shoppingBag">
                <table width="100%" border="0" cellspacing="1" cellpadding="0">
                    <tr>
                        <th>STT</th>
                        <th>{$messages.pInformation}</th>
                        <th>{$messages.images}</th>
                        <th>{$messages.quantity}</th>
                        <th>{$messages.price} (VNĐ)</th>
                        <th>{$messages.total} (VNĐ)</th>
                    </tr>{assign var=i value=0} {foreach from=$cartItems item=cartItem} {assign
                    var=product value=$products->getObject($cartItem->getPId())} {if $product}
                    {assign var=i value=$i+1}
                    <td>{$i}</td>
                    <td>Mã sản phẩm:{$product->getId()}
                        <br/>{$product->getName()|truncate:50}</td>
                    <td>
                        <img src="{$ROOTPATH}/gallery/avatar_upload/products/avatar/{$product->getAvatar()}"
                        alt="" style="max-width:120px; max-height:80px;" />
                    </td>
                    <td>{$cartItem->getQuantity()}</td>
                    <td>{$product->getPrice()|number_format:0:",":"."}</td>{assign var=price value=$product->getPrice()}
                    {assign var=quantity value=$cartItem->getQuantity()} {assign var=subTotal
                    value=$quantity*$price} {assign var=grandTotal value=$grandTotal+$subTotal}
                    <td>{$subTotal|number_format:0:",":"."}</td>
                    </tr>{/if} {/foreach}</table>
                <div class="total">
                    <p>
                        <span>{$messages.price}: {$grandTotal|number_format:0:",":"."} (VNĐ)</span></p>
                    <p>------------------------------------------------------</p>
                    <p>
                        <span>{$messages.total}: {$grandTotal|number_format:0:",":"."} (VNĐ)</span><br />(Giá đã bao gồm VAT)</p>
                </div>{/if}</div>
            <p class="btn2">
                <span class="btnType2">
                    <input type="submit" id="btnLogin" name="btnLogin" title="{$messages.continueorder}"
                    value="{$messages.continueorder}" />
                </span>
                <span class="btnType2">
                    <input type="button" id="edit" name="edit" title="{$messages.edit}" value="{$messages.edit}"
                    onClick="document.formOrder.plus.value='editOrder'; document.formOrder.submit();"
                    />
                    <input type="hidden" name="op" id="op" value="order" class="hidden" />
                    <input type="hidden" name="lang" id="lang" value="{$lang}" class="hidden"
                    />
                    <input type="hidden" name="plus" id="plus" value="submitOrder" class="hidden"
                    />
                    <input type="hidden" id="name" name="name" value="{$order.name}" class="hidden"
                    />
                    <input type="hidden" id="email" name="email" value="{$order.email}" class="hidden"
                    />
                    <input type="hidden" id="address" name="address" value="{$order.address}"
                    class="hidden" />
                    <input type="hidden" id="tel" name="tel" value="{$order.tel}" class="hidden"
                    />
                    <input type="hidden" id="cell" name="cell" value="{$order.cell}" class="hidden"
                    />
                    <input type="hidden" id="rname" name="rname" value="{$order.rname}" class="hidden"
                    />
                    <input type="hidden" id="raddress" name="raddress" value="{$order.raddress}"
                    class="hidden" />
                    <input type="hidden" id="rtel" name="rtel" value="{$order.rtel}" class="hidden"
                    />
                    <input type="hidden" id="rcell" name="rcell" value="{$order.rcell}" class="hidden"
                    />
                    <input type="hidden" id="delivery" name="delivery" value="{$order.delivery}"
                    class="hidden" />
                    <input type="hidden" id="rdate" name="rdate" value="{$order.year}-{$order.month}-{$order.day}"
                    class="hidden" />
                </span>
            </p>
            <p>&nbsp;</p>
        </fieldset>
    </form>
</div> 
                    </div>
                </div>
  			 </div>
   		</div>
{include file="$usertemplate/footer.tpl.html" title=footer} 